<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body>
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i><?=L('tpl_rk_01')?></cite></a>
        <a href="javascript:;"><?=L('tpl_rk_02')?></a>
        <a href="<?=site_url('collect/ruku')?>"><?=L('tpl_rk_03')?></a>
    </span>
    <form class="layui-form layui-form-so" action="<?=site_url('collect/ruku')?>" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label"><?=L('tpl_rk_04')?></label>
            <div class="layui-input-inline">
                <select name="dir">
                    <option value="0"><?=L('tpl_rk_05')?></option>
                    <?php
                        $query = $this->db->query("SELECT name,dir FROM ".CS_SqlPrefix."plugins order by id asc"); 
                        foreach ($query->result() as $row) {
                            
                            $selected = ($row->dir == $dir)?'selected':'';
                            echo '<option value="'.$row->dir.'" '.$selected.'>'.$row->name.'</option>';
                        }
                    ?>
                </select>
            </div>
            <label class="layui-form-label"><?=L('tpl_rk_06')?></label>
            <div class="layui-input-inline">
                <select name="zid">
                    <option value="0"><?=L('tpl_rk_05')?></option>
                    <option <?php if($zid==2){echo 'selected';}?> value="2"><?=L('tpl_rk_07')?></option>
                    <option <?php if($zid==1){echo 'selected';}?> value="1"><?=L('tpl_rk_08')?></option>
                </select>
            </div>
             <div class="layui-input-inline">
                <button class="layui-btn" type="submit"><?=L('tpl_rk_09')?></button>
            </div>
        </div>
    </form>
    <form class="layui-form" action="<?=site_url('collect/ruku_del')?>" method="post">
        <table class="layui-table" style="width: 99.7%">
            <colgroup>
                <col width="40">
            </colgroup>
            <thead>
                <tr>
                    <th><?=L('tpl_rk_10')?></th>
                    <th><?=L('tpl_rk_11')?></th>
                    <th class="phide"><?=L('tpl_rk_12')?></th>
                    <th><?=L('tpl_rk_13')?></th>
                    <th><?=L('tpl_rk_14')?></th>
                    <th class="phide"><?=L('tpl_rk_15')?></th>
                    <th><?=L('tpl_rk_16')?></th>
                </tr>
            </thead>
            <tbody>
            <?php
                if(empty($collect)) echo '<tr><td align="center" height="50" colspan="8">'.L('tpl_rk_17').'</td></tr>';
                foreach ($collect as $row) {
                    $pic=(!empty($row->pic))?'<img width="50" src="'.$row->pic.'">':'-';
                    $zt=($row->zid==1)?'<font class="colorl">'.L('tpl_rk_06').'</font>':'<font class="colorr">'.L('tpl_rk_07').'</font>';
                    echo '
                    <tr id="row_'.$row->id.'">
                    <td height="30"><input class="xuan" name="id['.$row->id.']" type="checkbox" value="'.$row->id.'" /></td>
                    <td >'.$row->id.'</td>
                    <td class="phide">'.$pic.'</td>
                    <td>'.$row->dir.'</td>
                    <td>'.$zt.'</td>
                    <td class="phide">'.date('Y-m-d H:i:s',$row->addtime).'</td>
                    <td class="basedb-more">
                    <a class="layui-btn layui-btn-mini" href="javascript:cscms.get_open(\''.site_url('collect/look').'?id='.$row->id.'\',\''.L('tpl_rk_18').'\',\'500px\',\'350px\');">'.L('tpl_rk_19').'</a>
                    <a class="layui-btn layui-btn-mini layui-btn-danger" href="javascript:cscms.del_one(\''.site_url('collect/ruku_del').'?id='.$row->id.'\','.$row->id.')">'.L('tpl_rk_20').'</a>
                    </td>
                    </tr> ';
                }
            ?>
            </tbody>
        </table>
        <div class="more_func">
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.select_all();"><i class="fa fa-check colorl" ></i><?=L('tpl_rk_21')?></a>
            <a class="layui-btn layui-btn-primary layui-btn-small" lay-submit lay-filter="del_pl"><i class="fa fa-close colorr" ></i><?=L('tpl_rk_22')?></a>
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.sel_submit('<?=site_url('collect/ruku_add')?>');"><i class="fa fa-save colorl" ></i><?=L('tpl_rk_23')?></a>
            <div class="next-line">
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.go_url('<?=site_url('collect/ruku_add')?>?ac=no');"><i class="fa fa-save colorn" ></i><?=L('tpl_rk_24')?></a>
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.go_confirm('<?=site_url('collect/ruku_del')?>?ac=yes','<?=L('tpl_rk_25')?>');" ><i class="fa fa-trash colord" ></i><?=L('tpl_rk_26')?></a></div><div class="next-line">
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.go_confirm('<?=site_url('collect/ruku_del')?>?ac=all','<?=L('tpl_rk_27')?>');"><i class="fa fa-trash colorr" ></i><?=L('tpl_rk_28')?></a></div>
        </div>
    </form>
    <div id="page">
        <div class="data_nums phide"><?=$page_data?></div>
        <div class="data_page"><?=$page_list?></div>
    </div>
<script type="text/javascript">
    cscms.init();
</script>
</body>
</html>

